
##R. make vars and report damaging

library(ggplot2)
library(ggrepel)
library(dplyr)
library(sqldf)
library(survival)
library(lme4)
library(lubridate)

### set these globals
basePath = "/gscratch/comdata/users/kaylea/taboo/" ##change if running in new environment
dataPath = paste0(basePath, 'processed_data/')
knitrPath = paste0(basePath, 'knitr_rdata/')
figPath = paste0(basePath, 'figures/')

### should run consistently from here with no changes to vars

ls()

dmg.CTab <- read.table(paste0(dataPath, 'predictions_damaging_euph.tsv'), quote="\"", header=TRUE, sep="\t", stringsAsFactors=FALSE)
dmg.CTab$source <- 'taboo'
dmg.CTab$taboo <- 1

dmg.NGram <- read.table(paste0(dataPath, 'predictions_damaging_ngram.tsv'), quote="\"", header=TRUE, sep="\t", stringsAsFactors=FALSE)
dmg.NGram$source <- 'ngram'
dmg.NGram$taboo <- 0

## NAs likely to vary a bit with the use of ORES, weights will need their own calculation but relies on revDF for article data -- further cleaning will need to wait
dmgDF <- rbind(dmg.NGram, dmg.CTab)

